<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
        <script src="../../../../libs/layui/layui.js"></script>
        <link rel="stylesheet" href="../../../../libs/layui/css/layui.css" />
        <title>Layui - 日期选择直接嵌套在页面上 (v2.6.8)</title>
    </head>
    <body style="padding: 15px; background-color: #f6f6f6">
        <span id="testView"></span>
        <div id="test2"></div>

        <script type="text/javascript">
            layui.use('laydate', function () {
                var laydate = layui.laydate;
                
                laydate.render({
                    elem: '#test2',
                    position: 'static',
                    change: function (value, date) {
                        //监听日期被切换
                        lay('#testView').html(value);
                    },
                });
            });
        </script>
    </body>
</html>
